import com.md.config.SpringConfig;
import com.md.entity.Book;
import com.md.service.BookService;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.List;

public class Teas {
    @Test
    public void t1(){
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);
        BookService service = context.getBean(BookService.class);
        List<Book> list=service.selectAll();
        System.out.println("list"+list);

    }
}
